Cookie technology is a very controversial technology, since its inception it has become a vast number of network users and web developersA point of contention. Some Internet users, even some senior web experts, are dissatisfied with its generation
The most commonly used method of cookies in ASP, please take notes:
1. How to write cookies.
Response.Cookies ("field name") = variable or string, for example:
Response.Cookies ("name2") = "Dingdang"
2. How to set the cookie time.
Response.Cookies ("
This article describes how to use cookies to set the instance code in the pop-up box every 24 hours. For more information about how to use cookies to set the sample code in the pop-up box every 24 hours, for more information, see
If you don't talk
Session management is an important part of web development, including sessions and cookie two technologies. This chapter describes the creation and use of cookies and sessions.
Cookies:
Cookies are often used to identify users. Cookies are small
Cookie OverviewIn the previous section, you used an immutable framework to store shopping bar data, and the product display page was constantly changing, although it was not rigorous to achieve a global variable. For example, if you right-click
First, we will introduce some simple usage methods.:
Assign COOKIES
Copy codeThe Code is as follows: Response. Cookies ["uid"]. Value = "20 ";
Response. Cookies ["LoginCode"]. Value = "58469 ";
The preceding two COOKIE variables are assigned two
Part of the cookie tells about the technical background of the cookie, which explains how to set up, use, delete cookies, and some of the limitations of cookies in PHP. PHP support for cookies is transparent and easy to use.
1, set cookie
PHP
Use JS to set cookies, read cookies, delete cookiesJavaScript is a script that runs on the client, so it is generally not possible to set the session because the session is running on the server side.The cookie is run on the client, so you can use
Some time ago to do the project, in front of the implementation of frequent operation cookies, record a few for your reference!
Cookie operation in the front-end development process often encountered, of course, if only to store some simple user
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.